#include <iostream>

#include "location.h"
using namespace std;

//constructors
Location::Location()
{

}

Location::Location(int id)
{
    this->id_=id;
}

Location::Location(int x, int y)
{
    //set locations
    this->setX(x);
    this->setY(y);
}

Location::Location(int x, int y, int r)
{
    //set locations
    this->setX(x);
    this->setY(y);
    this->setRotation(r);
}

//getters and setters
int Location::getX()
{
    return this->x_;
}
int Location::getY()
{
    return this->y_;
}
int Location::getRotation()
{
    return this->rotation_;
}

void Location::setX(int x)
{
    this->x_=x;
}
void Location::setY(int y)
{
    this->y_=y;
}
void Location::setXY(int x, int y)
{
    this->x_=x;
    this->y_=y;
}
void Location::setRotation(int r)
{
    this->rotation_=r;
}

void Location::setTestLocation(int x, int y, int r)
{
	this->x_ = x;
	this->y_ = y;
	this->rotation_ = r;
}

void Location::Notify(int id, int x ,int y){
    std::cout<<"notifyed! \n";
    std::cout<<"peke id"<< this->id_ << "input id"<< id <<endl;
    if(this->id_==id){
        cout<<"dees peke";
        this->setXY(x,y);
    }
}
